<?php

	include("../includes/connect_db.php");

	$id = base64_decode($_GET[trim(base64_encode("idroom"), '=')]);

	$sql = "SELECT * FROM front_office WHERE idroom = '".$id."'";
	$query = mysql_query($sql);
	$arrayRoom = array();
	while ($data = mysql_fetch_array($query)) {
		$arrayGuest["id"] = $data["id"];
		$arrayGuest["title"] = $data["nama"];
		$arrayGuest["start"] = $data["checkin"];
		$arrayGuest["end"] = $data["checkout"];
		$arrayGuest["url"] = "#";
		array_push($arrayRoom, $arrayGuest);
	}
	echo json_encode($arrayRoom);

?>